desc 'LibManager 使用这个航道,可以快速的对自己的私有库,进行维护升级'
lane :LibManager do |options|

tagVersion = options[:tag]
targetSpectName = options[:target]

#具体这个航道执行哪些行为

# 1.podinstall

cocoapods(
clean: true,
podfile: "./Example/Podfile"
)

# 2.git add .

git_add(path: ".")

#    git commit -m 'xxxxx'

git_commit(path: ".", message: "当前版本版本#{tagVersion}")

#    git push origin master

push_to_git_remote

# 3.验证tag是否存在,如果存在,因该删除本地标签和远程标签
#if 存在标签
#   执行删除本地/远程标签
#end

if git_tag_exists(tag:tagVersion)
    UI.message("发现tag:#{tagVersion}存在,即将执行删除操作🚀")
    git_remove_tag(tag:tagVersion)
end

# 4.git tag 标签版本

add_git_tag(
tag: tagVersion
)

#    git push --tags

push_git_tags

# 5.pod spec lint

#   pod_lib_lint(allow_warnings: true)

#  6. pod repo push xxxx xxx.podspec

#pod_push(path: "#{targetSpectName}.podspec", repo: "YZGSpecs", allow_warnings: true)
pod_push(path: "#{targetSpectName}.podspec", repo: "YZGSpecs", allow_warnings: true, sources: ["https://git.coding.net/cnsuer/YZGSpecs.git", "https://github.com/CocoaPods/Specs.git"])

end
